home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / Mesa-2.2 / include / GL / dosmesa.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-06  |  2.7 KB  |  116 lines

  1. /* $Id: DOSmesa.h,v 1.1 1996/09/13 01:26:41 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  2.0
  6.  * Copyright (C) 1995-1996  Brian Paul
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /*
  25.  * $Log: DOSmesa.h,v $
  26.  * Revision 1.1  1996/09/13 01:26:41  brianp
  27.  * Initial revision
  28.  *
  29.  */
  30.  
  31.  
  32.  
  33. /*
  34.  * DOS/Mesa interface for Linux.
  35.  */
  36.  
  37.  
  38. /*
  39.  * Intro to using the VGA/Mesa interface
  40.  *
  41.  * 1. #include the <vga.h> file
  42.  * 2. Call vga_init() to initialize the DOS library.
  43.  * 3. Call vga_setmode() to specify the screen size and color depth.
  44.  * 4. Call DOSMesaCreateContext() to setup a Mesa context.  If using 8-bit
  45.  *    color Mesa assumes color index mode, if using 16-bit or deeper color
  46.  *    Mesa assumes RGB mode.
  47.  * 5. Call DOSMesaMakeCurrent() to activate the Mesa context.
  48.  * 6. You can now use the Mesa API functions.
  49.  * 7. Before exiting, call DOSMesaDestroyContext() then vga_setmode(TEXT)
  50.  *    to restore the original text screen.
  51.  *
  52.  * Notes
  53.  * 1. You must run your executable as root (or use the set UID-bit) because
  54.  *    the DOS library requires it.
  55.  * 2. The DOS driver is not fully implemented yet.  See DOSmesa.c for what
  56.  *    has to be done yet.
  57.  */
  58.  
  59.  
  60. #ifndef DOSMESA_H
  61. #define DOSMESA_H
  62.  
  63.  
  64. #define DOSMESA_MAJOR_VERSION 2
  65. #define DOSMESA_MINOR_VERSION 0
  66.  
  67.  
  68.  
  69. #ifdef __cplusplus
  70. extern "C" {
  71. #endif
  72.  
  73.  
  74. /*
  75.  * This is the DOSMesa context 'handle':
  76.  */
  77. typedef struct DOSmesa_context *DOSMesaContext;
  78.  
  79.  
  80.  
  81. extern DOSMesaContext DOSMesaCreateContext( void );
  82.  
  83. extern void DOSMesaDestroyContext( DOSMesaContext ctx );
  84.  
  85. extern void DOSMesaMakeCurrent( DOSMesaContext ctx );
  86.  
  87. extern DOSMesaContext DOSMesaGetCurrentContext( void );
  88.  
  89.  
  90.  
  91. #ifdef __cplusplus
  92. }
  93. #endif
  94.  
  95. #ifndef BOOL
  96. #define BOOL unsigned char
  97. #endif
  98.  
  99. #define HWND unsigned long
  100. #define HDC unsigned long
  101. #define HPALETTE unsigned long
  102. #define WCHAR char
  103. #define PASCAL
  104. #define UINT unsigned int
  105. #define ULONG unsigned long
  106. #define USHORT unsigned short
  107. #define DWORD unsigned long
  108. #define WORD unsigned short
  109. #define LONG long
  110.  
  111.  
  112.  
  113.  
  114. #endif
  115.  
  116.